// models/associations.js
const ComProducts = require('./comProducts');
const ComProductsSkus = require('./ComProductsSkus');

module.exports = () => {
    // 定义产品与SKU的关联
    ComProducts.hasMany(ComProductsSkus, { foreignKey: 'product_id', as: 'skus' });
    ComProductsSkus.belongsTo(ComProducts, { foreignKey: 'product_id', as: 'product' });
    // 可以在这里定义其他模型的关联关系
};